//
//  SharedDictionary.m
//  AgriMobile
//
//  Created by 春名 啓作 on 11/05/25.
//  Copyright 2011 e-agri. All rights reserved.
//

#import "SharedDictionary.h"


@implementation SharedDictionary

@synthesize data;

static SharedDictionary* sharedInstance = nil;

+ (id)sharedDictionary {
	@synchronized(self) {
		if(!sharedInstance) {
			[[self alloc] init];
		}
	}
	return sharedInstance;
}

+ (id)allocWithZone:(NSZone *)zone {
	@synchronized(self) {
		if (!sharedInstance) {
			sharedInstance = [super allocWithZone:zone];
		}
	}
	return sharedInstance;
}

- (id)copyWithZone:(NSZone *)zone {
	return self;
}

- (id)retain {
	return self;
}

- (unsigned)retainCount {
	return UINT_MAX;  // 解放できないオブジェクトであることを示す
}

- (void)release {
	// 何もしない
}

- (id)autorelease {
	return self;
}

@end
